# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="1"

inherit eutils rpm

MY_PV="2.3-3"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="HighPoint RocketRaid CLI configuration tool."
HOMEPAGE="http://www.highpoint-tech.com"

SRC_URI="http://www.highpoint-tech.com/BIOS_Driver/HRM/Linux/CLI-Linux-${MY_PV}-1214.tgz"

LICENSE=""

SLOT="0"

KEYWORDS="~amd64 ~x86"

IUSE=""

RESTRICT="strip mirror"

DEPEND="=sys-block/hptsvr-3.13.4*"

RDEPEND="${DEPEND}"

src_unpack() {
	unpack ${A}
	cd "${WORKDIR}"

	einfo "Removing unnessary files form WORKDIR."
	rm "${WORKDIR}"/hptsvr-*.rpm

	einfo "Unpacking ${MY_P}.i386.rpm"
	rpm_unpack "${WORKDIR}/${MY_P}.i386.rpm"
}

src_install() {
	dodoc "${WORKDIR}/HPT_CLI_Guide.pdf"
	dobin "${WORKDIR}/usr/bin/hptraidconf"
}
